package com.belf.quartz.task;

import com.belf.common.core.domain.AjaxResult;
import com.belf.console.service.IAppraiseTasksService;
import com.belf.console.service.IDataCheckTaskService;
import com.belf.console.service.IDataTaskConfService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * BelfDataTask
 *
 * @author l
 * @since 2024/8/15 10:07
 */

@Component("belfDataTask")
public class BelfDataTask {

    private static final Logger logger = LoggerFactory.getLogger(BelfDataTask.class.getName());

    @Autowired
    private IAppraiseTasksService appraiseTasksService;
    @Autowired
    private IDataTaskConfService dataTaskConfService;
    @Autowired
    private IDataCheckTaskService dataCheckTaskService;


    public void appraiseTaskRun(Long id) {
        logger.info("appraiseTaskRun");
        AjaxResult ajaxResult = appraiseTasksService.executeTaskById(id);
        logger.info(ajaxResult.toString());
    }

    public void  dataTaskConfRun(Long id){
        logger.info("dataTaskConfRun");
        AjaxResult ajaxResult = dataTaskConfService.executeTaskById(id);
        logger.info(ajaxResult.toString());
    }

    public void dataCheckTaskRun(Long id) {
        logger.info("dataCheckTaskRun");
        AjaxResult ajaxResult = dataCheckTaskService.executeTaskById(id);
        logger.info(ajaxResult.toString());
    }
}
